package cn.jobstart.common;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

/**
 * @author sunke
 * @Date 2017/6/13 13:01
 * @description 全局变量
 */

@Component
public class Const {





    public final static String ADMIN_SESSION = "admin_session";

    public final static String ENCODE = "utf-8";


    public static final String[] IMG_TYPE = new String[]{"jpg", "png", "gif", "jpeg"};
    public static final String[] PDF_TYPE = new String[]{"pdf"};


    public final static String REDIRECT = "redirect:";

    public final static String PAGINATE_DATA_KEY = "list";//分页时返回数据的Key
    public final static String PAGINATE_PAGE_KEY = "page";//分页时返回分页的Key

    public final static String DETAIL_KEY = "domain";
    public final static String IDCARD_DIR = "idcard";
    public final static String IDCARD_WATEMARK = "watemark_";
    public final static String IDCARD_FRONT = "front_";
    public final static String IDCARD_BACK = "back_";
    public final static String IDCARD_BODY = "body_";
    public final static String CONTRACT_DIR = "contract";//合同目录
    public final static int TRY_MAX_COUNT = 50;//网络请求重试次数
    public static final String REFUND_SUCCESS = "SUCCESS";



    public static  final String REDIDS_KEY_PERSON="hr_data_person";
    public static  final String REDIDS_KEY_EDUCATION="hr_data_education";
    public static  final String REDIDS_KEY_AGE="hr_data_age";
    public static  final String REDIDS_KEY_CITY="hr_data_city";
    public static  final String REDIDS_KEY_COMPANY="hr_data_company";


  //  public final static String FULL_ALL_KEY = "FULL_ALL";

    //退货时间,收货后3天内

    public static final int PRODUCT_ORDER_RETURN_GOODS_DAY = 3;
    public static final BigDecimal SHOP_CLIENT_CASH_REWARD = new BigDecimal(188);//店长购买，店主现金奖励
    public static String UPLOAD_PATH = "/upload";





    @Value("${file.upload.root}")
    public void setUpload(String upload) {
        Const.UPLOAD_PATH = upload;
    }
}
